package com.ruoyi.app.service.impl;

import com.ruoyi.app.domain.Patient;
import com.ruoyi.app.mapper.PatientMapper;
import com.ruoyi.app.service.PatientService;
import com.ruoyi.app.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 75460
* @description 针对表【patient(x就诊人表)】的数据库操作Service实现
* @createDate 2025-05-14 09:00:42
*/
@Service
public class PatientServiceImpl implements PatientService{
    @Autowired
    private PatientMapper patientMapper;

    @Override
    public List<Patient> getList(Integer userId) {
        return patientMapper.getList(userId);
    }

    @Override
    public int add(Patient patient) {
        return patientMapper.add(patient);
    }

    @Override
    public int update(Patient patient) {
        return patientMapper.update(patient);
    }


    @Override
    public Patient getById(Integer id) {
        return patientMapper.getById(id);
    }

    @Override
    public Patient getByNameById(Integer patientId) {
        return patientMapper.getByNameById(patientId);
    }

    @Override
    public Patient getPatinetSelect(Long userId) {
        return patientMapper.getPatinetSelect(userId);
    }

    @Override
    public Patient getSelectById(Long patientId) {
        return patientMapper.getSelectById(patientId);
    }
}




